package cn.bgs.controller;


import cn.bgs.common.R;
import cn.bgs.pojo.StyleShow;
import cn.bgs.service.StyleShowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 风貌展示表 前端控制器
 * </p>
 *
 * @author Mr.Zhao
 * @since 2022-08-08
 */
@RestController
@RequestMapping("/style-show")
public class StyleShowController {

    @Autowired
    private StyleShowService homeStyleService;

    @GetMapping("findStyleShow")
    public R findStyleShow(@RequestParam String styShowTitle, @RequestParam String styShowState){
        return homeStyleService.findStyleShow(styShowTitle, styShowState);
    }

    @GetMapping("findStyleShowId")
    public R findStyleShowId(@RequestParam Integer id){
        return homeStyleService.findStyleShowId(id);
    }

    @PostMapping("addStyleShow")
    public R addStyleShow(@RequestBody StyleShow styleShow){
        return homeStyleService.addStyleShow(styleShow);
    }

    @PostMapping("updateStyleShow")
    public R updateStyleShow(@RequestBody StyleShow styleShow){
        return homeStyleService.updateStyleShow(styleShow);
    }

    @GetMapping("delStyleShow")
    public R delStyleShow(@RequestParam Integer id){
        return homeStyleService.delStyleShow(id);
    }

}

